package org.example;


import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

@Controller
public class User {
    public String name;
    public int age;

    @Bean(name="u1")
    public User say(){
        User user=new User();
        user.age=1;
        user.name="krik";
        return user;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
